﻿@using ElearningOUHv2.Models
@{
    Afdeling afd = Session["Afdeling"] as Afdeling;
    AjaxOptions ao = new AjaxOptions
    {
        InsertionMode = InsertionMode.Replace,
        UpdateTargetId = "partial",
        HttpMethod = "POST"
    };
    List<Emne> emner = Session["emner"] as List<Emne>;
}
<fieldset>
<legend>Rediger emner tilknyttet afdeling</legend>
@using (Ajax.BeginForm("SaveEmnerInAfd", ao))
{
    <table>
        <tr>
            <th>
                Tilknyt emne til afdeling
            </th>
        </tr>
        @foreach (Emne E in emner)
        {
            <tr>
            <td>
            <input type="checkbox" name="Sel-@E.emneId" /> @E.emnenavn
            </td>
            </tr>
        }
    </table>
    <input type="submit" value="Gem ændring" />
}
</fieldset>